package main

import (
	"fmt"
	"github/kadycui/gids/api"
	"github/kadycui/gids/conf"
	"github/kadycui/gids/middleware"
	"github/kadycui/gids/pkg/postgre"
	"github/kadycui/gids/pkg/redis"
)

func main() {
	fmt.Println("====================GIDS START====================")

	// 初始配置信息
	conf.InitConfig()

	// 初始化日志
	middleware.InitLogger()

	// 初始化Redis
	redis.RedisInit()

	// 初始化db
	postgre.InitPG()

	// 数据迁移
	postgre.Migrate()

	// 消息队列
	// go rmq.Receive()

	fmt.Println("====================================================")

	// 加载路由
	r := api.Engine()

	r.Run("127.0.0.1:3001")
}
